<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <title>公信商城－我的店铺</title>

    <!--图标字体 http://fontawesome.io/icons/ -->
    <link rel="stylesheet" href="css/font/css/font-awesome.min.css" />
    <link rel="stylesheet" href="css/ui-base.css"/>
    <link rel="stylesheet" href="css/main.css"/>
    <script src="js/jquery.min.js"></script>
    <!--<script src="js/loaderMask.js"></script>-->

    <!--icheck组件-->
    <link href="js/icheck-1.x/skins/flat/blue.css" rel="stylesheet">
    <script src="js/icheck-1.x/icheck.min.js"></script>
</head>
<body>
    <header class="header">
        <span class="title">我的店铺</span>
        <a class="l-btn l-back" href="javascript: window.history.go(-1);"></a>
        <!--<a class="r-btn r-pcenter" href="personalCenter.html"></a>-->
    </header>
    <div class="content w100 ho">
        <div class="store-cc ho w100">
            <div class="create-store ho">
                <img src="images/store/store-logo.png"/>
                <input type="checkbox" checked id="store-xy">
                <label for="store-xy">我已阅读并同意 <a href="##">店铺协议</a></label>
                <span class="btn-center">创建店铺</span>
            </div>
        </div>
    </div>

    <!--弹框组件-->
    <script src="js/sweetalert/sweetalert.min.js"></script>
    <link rel="stylesheet" type="text/css" href="js/sweetalert/sweetalert.css">
    <script>
        $(function () {
            /*icheck组件*/
            $('input').iCheck({
                checkboxClass: 'icheckbox_flat-blue',
                radioClass: 'iradio_flat-blue'
            });
            /*创建店铺校验*/
            $('.create-store .btn-center').on('click', function () {
                /*判断公信值是否达到要求 或 是否实名认证*/
                var trustNum = 60; //公信值
                var isVerified = true;  //是否实名认证
                if (trustNum < 50) {
                    swal({
                        title:"不能开启店铺",
                        text: "主人，您的公信值不足!",
                        type: "warning",
                        showConfirmButton: true,
                        confirmButtonText: "确定",
                        confirmButtonColor: "#FF4F06"
                    });
                } else if (!isVerified) {
                    swal({
                        title:"不能开启店铺",
                        text: "主人，您还未实名认证!",
                        type: "warning",
                        showConfirmButton: true,
                        confirmButtonText: "确定",
                        confirmButtonColor: "#FF4F06"
                    }, function () {
                        window.location.href = 'verified.html';
                    });
                } else {
                    swal({
                        title:"创建成功",
                        text: "你可以开始设置店铺了！",
                        type: "success",
                        showConfirmButton: true,
                        confirmButtonText: "确定",
                        confirmButtonColor: "#FF4F06"
                    }, function () {
                        window.location.href = 'myStore-index.html';
                    });
                }
            });
        });
    </script>
</body>
</html>